<template>
	<view class="userTitles" :class="{'bg':bg}" :style="{'paddingTop':SystemTop,'lineHeight':height}">
		{{title}}
	</view>
</template>

<script>
	export default {
		props: {
			bg: {
				default: true,
				required: false
			},
			title: {
				default: '',
				required: false
			}
		},
		data() {
			return {
				SystemTop: '0',
				height: '0',
			}
		},
		onReady() {
			// const custom =  20
			// const height =  20
			// this.SystemTop = custom + 'px'
			// this.height = height + 'px'
		}
	}
</script>

<style lang="scss" scoped>
	.bg {
		background-color: white;
	}
	@media (min-width:500px) {
		.userTitles {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #000000;
			//line-height: 38rpx;
			text-align: center;
			display: flex;
			justify-content: center;
			align-items: center;
			//height: 150rpx;
			padding-bottom: 22rpx;
			position: fixed;
			width: 375px;
			z-index: 970;
		}
	}
	@media (max-width:499px) {
		.userTitles {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #000000;
			//line-height: 38rpx;
			text-align: center;
			display: flex;
			justify-content: center;
			align-items: center;
			//height: 150rpx;
			padding-bottom: 30px;
			position: fixed;
			width: 100%;
			z-index: 970;
		}
	}
</style>